package com.hibase.core.rule.entity.ruletable;

import com.baomidou.mybatisplus.annotation.TableField;
import com.hibase.core.mybatis.entity.BaseDO;
import com.hibase.core.rule.constant.RuleRangeTypeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 动态规则表
 * </p>
 *
 * @author hufeng
 * @since 2019-06-10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class RuleTable extends BaseDO {

    private static final long serialVersionUID = 1L;

    /**
     * 表名
     */
    private String name;

    /**
     * 状态(启用/禁用)
     */
    private String status;

    /**
     * 是否允许范围查找(0 不允许, 1允许)
     */
    private Boolean beFindRange;

    /**
     * 是否允许多值(0 不允许, 1允许)
     */
    private Boolean beMultiValue;

    /**
     * 范围类型(LEFT_OR_RIGHT左开右合/LEFT_OR_RIGHT_AWAY左合右开)
     * {@link RuleRangeTypeEnum}
     */
    private String rangeType = RuleRangeTypeEnum.LEFT_OR_RIGHT.getKey();

    /**
     * 查找类型（一对一/一对多/范围一对一/范围一对多）
     * {@link RuleFieldType}
     */
    private String searchType;


    /**
     * 备注
     */
    private String remarks;

    @TableField(exist = false)
    private String fieldCount;

    @TableField(exist = false)
    private String dataCount;

}
